<?php

class BookmarkTable extends Doctrine_Table
{
    public static function createTags($bookmarkId, $tagList)
    {
        $tags = explode(',', $tagList);

        foreach ($tags as $tag) {
            $t = new Tag();
            $t->setBookmarkId($bookmarkId);
            $t->setName(trim($tag));
            $t->save();
        }
    }
}